const Login = () => import('@/pages/Login')

// import Main from '@/pages/contents/Main'
const Main = () => import('@/pages/contents/main/Main')
// 分析模块
const KPI = () => import('@/pages/contents/analyzer/reporting/KPIPIReport')
const MessageReport = () =>
  import('@/pages/contents/analyzer/reporting/MessageReport')
const BatchProcessParameterReport = () =>
  import('@/pages/contents/analyzer/reporting/BatchProcessParameterReport')
const CriticalEquipmentEfficiencyReport = () =>
  import(
    '@/pages/contents/analyzer/reporting/CriticalEquipmentEfficiencyReport'
  )
const EnergyRecoveryEfficiencyReport = () =>
  import('@/pages/contents/analyzer/reporting/EnergyRecoveryEfficiencyReport')
const EnergyTransitionEfficiencyReport = () =>
  import('@/pages/contents/analyzer/reporting/EnergyTransitionEfficiencyReport')
const SPC = () => import('@/pages/contents/analyzer/dashboard/SPC')
const DotGraph = () => import('@/pages/contents/analyzer/dashboard/DotGraph')
const Benchmark = () => import('@/pages/contents/analyzer/dashboard/Benchmark')
const PlantModulation = () =>
  import('@/pages/contents/analyzer/dashboard/PlantModulation')

// 跟踪模块˙
const BatchParameter = () => import('@/pages/contents/tracking/BatchParameter')
// 子路由
// const BatchSummary = () =>
//   import('@/pages/contents/tracking/BatchParameterPages/BatchSummary')
const AreaLineOverview = () =>
  import('@/pages/contents/tracking/BatchParameterPages/AreaLineOverview')
const EquipmentUnitPiMonitor = () =>
  import('@/pages/contents/tracking/BatchParameterPages/EquipmentUnitPiMonitor')

const GOPSBPE = () => import('@/pages/contents/tracking/GOPSBPE')
const KPIPI = () => import('@/pages/contents/tracking/KPIPI')
const Heat = () => import('@/pages/contents/tracking/producer_efficiency_bak/Heat')
const ProducerEfficiency = () => import('@/pages/contents/tracking/ProducerEfficiency')
const KPIPIHome = () => import('@/pages/contents/tracking/KPIPIPages/KPIPIHome')
const KPIPISecond = () => import('@/pages/contents/tracking/KPIPIPages/KPIPISecond')
const KPIPIThird = () => import('@/pages/contents/tracking/KPIPIPages/KPIPIThird')

// 实验室模块
const Calibration = () => import('@/pages/contents/lab_operation/Calibration')
const Certification = () =>
  import('@/pages/contents/lab_operation/Certification')
const Fabric = () => import('@/pages/contents/lab_operation/Fabric')
const Reagent = () => import('@/pages/contents/lab_operation/Reagent')
const SOPOPL = () => import('@/pages/contents/lab_operation/SOPOPL')

// 系统配置模块
const DataAcquisition = () =>
  import('@/pages/contents/system_configuration/DataAcquisition')
const PhysicalModeling = () =>
  import(
    '@/pages/contents/system_configuration/PhysicalModeling/PhysicalModeling'
  )
const ProcessModeling = () =>
  import('@/pages/contents/system_configuration/ProcessModeling')
const PTS = () => import('@/pages/contents/system_configuration/PTS')
const Sampling = () => import('@/pages/contents/system_configuration/Sampling')
const User = () => import('@/pages/contents/system_configuration/User')

// 测试路由
const Test = () => import('@/pages/test/Test')

export const routes = [
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/',
    name: 'Home',
    meta: {
      requireAuth: true
    },
    component: () => import('@/pages/home/Home'), //项目主页
    children: [
      {
        path: 'main',
        name: 'Main',
        component: Main
      },
      {
        path: 'kpi',
        name: 'KPI',
        component: KPI
      },
      {
        path: 'message_report',
        name: 'MessageReport',
        component: MessageReport
      },
      {
        path: 'batch_process_parameter_report',
        name: 'BatchProcessParameterReport',
        component: BatchProcessParameterReport
      },
      {
        path: 'critical_equipment_efficiency_report',
        name: 'CriticalEquipmentEfficiencyReport',
        component: CriticalEquipmentEfficiencyReport
      },
      {
        path: 'energy_recovery_efficiency_report',
        name: 'EnergyRecoveryEfficiencyReport',
        component: EnergyRecoveryEfficiencyReport
      },
      {
        path: 'energy_transition_efficiency_report',
        name: 'EnergyTransitionEfficiencyReport',
        component: EnergyTransitionEfficiencyReport
      },
      {
        path: 'spc',
        name: 'SPC',
        component: SPC
      },
      {
        path: 'plant_modulation',
        name: 'PlantModulation',
        component: PlantModulation
      },
      {
        path: 'dot_graph',
        name: 'DotGraph',
        component: DotGraph
      },
      {
        path: 'benchmark',
        name: 'Benchmark',
        component: Benchmark
      },
      {
        path: 'batch_parameter',
        name: 'BatchParameter',
        component: BatchParameter,
        // children: [
        //   {
        //     path: '/', //batch_summary
        //     name: 'BatchSummary',
        //     component: BatchSummary
        //   },
        //   {
        //     path: '/area_line_overview', //area_line_overview
        //     name: 'AreaLineOverview',
        //     component: AreaLineOverview
        //   },
        //   {
        //     path: '/equipment_unit_pi_monitor', //equipment_unit_pi_monitor
        //     name: 'EquipmentUnitPiMonitor',
        //     component: EquipmentUnitPiMonitor
        //   }
        // ]
      },
      //取消子路由，把子路由里面的两个子组件提了出来
      {
        path: '/area_line_overview', //area_line_overview
        name: 'AreaLineOverview',
        component: AreaLineOverview
      },
      {
        path: '/equipment_unit_pi_monitor', //equipment_unit_pi_monitor
        name: 'EquipmentUnitPiMonitor',
        component: EquipmentUnitPiMonitor
      },      
      {
        path: 'gops_bpe',
        name: 'GOPSBPE',
        component: GOPSBPE
      },
      {
        path: 'heat',
        name: 'Heat',
        component: Heat
      },
      {
        path: 'kpi_pi',
        // name: 'KPIPI',
        component: KPIPI,
        children: [
          {
            path: '/',    //kpipi_home
            name: 'KPIPIHome',
            component: KPIPIHome
          },{
            path: '/kpipi_second',   //kpipi_second
            name: 'KPIPISecond',
            component: KPIPISecond
          },
          {
            path: '/kpipi_third',  //kpipi_third
            name: 'KPIPIThird',
            component: KPIPIThird
          }
        ]
      },
      {
        path: 'producer_efficiency',
        name: 'ProducerEfficiency',
        component: ProducerEfficiency
      },
      {
        path: 'calibration',
        name: 'Calibration',
        component: Calibration
      },
      {
        path: 'certification',
        name: 'Certification',
        component: Certification
      },
      {
        path: 'fabric',
        name: 'Fabric',
        component: Fabric
      },
      {
        path: 'reagent',
        name: 'Reagent',
        component: Reagent
      },
      {
        path: 'sop_opl',
        name: 'SOPOPL',
        component: SOPOPL
      },
      {
        path: 'data_acquisition',
        name: 'DataAcquisition',
        component: DataAcquisition
      },
      {
        path: 'physical_modeling',
        name: 'PhysicalModeling',
        component: PhysicalModeling
      },
      {
        path: 'process_modeling',
        name: 'ProcessModeling',
        component: ProcessModeling
      },
      {
        path: 'pts',
        name: 'PTS',
        component: PTS
      },
      {
        path: 'sampling',
        name: 'Sampling',
        component: Sampling
      },
      {
        path: 'user',
        name: 'User',
        component: User
      },
      {
        path: 'test',
        name: 'Test',
        component: Test
      }
    ]
  }
]
